Skip to content

feat: add web platform vocabulary#824

Merged
thymikee merged 2 commits into
mainfrom
codex/web-platform-vocabulary
Jun 19, 2026
Merged

feat: add web platform vocabulary#824
thymikee merged 2 commits into
mainfrom
codex/web-platform-vocabulary

Conversation

@thymikee

Copy link
Copy Markdown
Member

Summary

Adds web as a shared platform selector across CLI, structured command input, client normalization, session lock checks, and capability admission.

Enables only the first web command slice (open, close, snapshot/read/selector interactions, typing, press/click/fill/scroll) and keeps native/device commands unsupported. Adds the stable local web desktop placeholder agent-browser-chrome plus focused parser/schema/capability tests.

Closes #818

Touched files: 12. Scope stayed within platform vocabulary, input, normalization, capability admission, fixtures, and tests.

Validation

pnpm format completed successfully. pnpm typecheck passed. Targeted Vitest coverage passed for capabilities, CLI args, and command surface metadata: 3 files, 126 tests.

@github-actions

github-actions Bot commented Jun 19, 2026

Copy link
Copy Markdown

Size Report

Metric Base Current Diff
JS raw 1.3 MB 1.3 MB +520 B
JS gzip 415.8 kB 416.2 kB +351 B
npm tarball 550.7 kB 551.0 kB +343 B
npm unpacked 1.9 MB 1.9 MB +569 B

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 24.6 ms 26.4 ms +1.7 ms
CLI --help 42.4 ms 45.1 ms +2.7 ms

Top changed chunks:

Chunk Raw diff Gzip diff
dist/src/9722.js +242 B +94 B
dist/src/9873.js +55 B +37 B
dist/src/session.js +115 B +22 B
dist/src/selector-runtime.js +23 B +5 B

@thymikee

Copy link
Copy Markdown
Member Author

Blocking review finding: src/remote-config-schema.ts:84 still omits web from REMOTE_CONFIG_FIELD_SPECS.platform. CLI option metadata now includes web, so src/utils/tests/cli-option-schema.test.ts fails its schema-alignment assertion, and remote config/env defaults with platform=web would be rejected despite PlatformSelector accepting it. Please source this enum from PLATFORM_SELECTORS or add web here and keep the alignment test green.

@thymikee

Copy link
Copy Markdown
Member Author

Additional review findings:

  1. src/core/dispatch-resolve.ts currently treats every selector except android/linux as Apple-family in isAppleResolutionSelector. After this PR, platform web enters that path. Plain web resolution happens to return the placeholder, but mixed selectors like platform web plus udid can now report Apple-specific errors, and the predicate is no longer a valid platform-boundary contract. Please make it explicit for ios, macos, and apple or use the shared Apple predicate, and add a web resolution regression test.

  2. src/core/platform-inventory.ts appends agent-browser-chrome to unfiltered inventory. Because sessionless open may resolve a default device without platform, a host with no other candidates can now auto-select web and then fail at dispatch with Unsupported platform web because this PR intentionally has no web interactor/provider. Please keep the placeholder opt-in via platform web until the provider slice lands, or add an intentional test documenting the new default-selection behavior.

@thymikee

Copy link
Copy Markdown
Member Author

Additional route/admission finding: appstate is not covered by the capability matrix because it is capability-exempt in src/command-catalog.ts, but the new platform vocabulary lets appstate run with platform web. In src/daemon/handlers/session-state.ts, non-iOS and non-macOS devices fall through to getAndroidAppState, so appstate --platform web can reach the Android app-state backend instead of being rejected as unsupported. Issue #818 keeps native app state out of scope, so please add an explicit web rejection or capability/admission coverage plus a regression test.

@thymikee

Copy link
Copy Markdown
Member Author

Addressed the review findings in a313e929a:

  • Remote config platform enum now sources PLATFORM_SELECTORS, so web stays aligned with CLI option metadata and cli-option-schema.test.ts.
  • dispatch-resolve now routes only ios, macos, and apple through Apple-family resolution; web has generic resolution coverage.
  • The web placeholder is opt-in via --platform web and no longer appended to unfiltered inventory.
  • appstate --platform web now returns UNSUPPORTED_OPERATION before Android app-state dispatch, with handler coverage.

Validation passed:

  • pnpm exec vitest run src/core/__tests__/dispatch-resolve.test.ts src/__tests__/remote-config-public.test.ts src/utils/__tests__/cli-option-schema.test.ts
  • pnpm exec vitest run src/utils/__tests__/cli-option-schema.test.ts src/core/__tests__/dispatch-resolve.test.ts src/daemon/handlers/__tests__/session-state.test.ts src/core/__tests__/capabilities.test.ts src/utils/__tests__/args.test.ts src/commands/__tests__/command-surface-metadata.test.ts
  • pnpm typecheck
  • pnpm check:unit
  • pnpm format
  • git diff --check

@thymikee thymikee merged commit 188715b into main Jun 19, 2026
19 checks passed
@thymikee thymikee deleted the codex/web-platform-vocabulary branch June 19, 2026 09:56
@github-actions

Copy link
Copy Markdown
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-06-19 09:57 UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: add web platform vocabulary

1 participant